/**
 * Note: The returned array must be malloced, assume caller calls free().
 */
int* countNumbers(int cnt, int* returnSize) 
{   int resSize=1;
    while(cnt!=0)
    {
        resSize*=10;
        cnt--;
    }
    *returnSize=resSize-1;
    int* res=(int*)malloc(sizeof(int)*resSize);
    for(int i=1;i<resSize;i++)
    {   
        res[i-1]=i;
    }
    return res;
    free(res);
}